{% extends "base.html" %}

{% block title %}注册{% endblock %}

{% block content %}
    <h1 style="text-align: center; color: #007BFF; margin-bottom: 30px;">用户注册</h1>
    <form method="POST" style="max-width: 400px; margin: 0 auto;">
        {{ form.hidden_tag() }}

        <div style="margin-bottom: 20px;">
            <label style="display: block; margin-bottom: 5px; color: #333;">{{ form.username.label }}</label>
            {{ form.username(class="form-input") }}
        </div>

        <div style="margin-bottom: 20px;">
            <label style="display: block; margin-bottom: 5px; color: #333;">{{ form.password.label }}</label>
            {{ form.password(class="form-input") }}
        </div>

        <div style="margin-bottom: 20px;">
            <label style="display: block; margin-bottom: 5px; color: #333;">{{ form.confirm_password.label }}</label>
            {{ form.confirm_password(class="form-input") }}
        </div>

        <div style="text-align: center; margin-top: 20px;">
            {{ form.submit(class="form-button") }}
        </div>
    </form>

    <p style="text-align: center; margin-top: 20px;">
        已有账号？
        <a href="{{ url_for('login') }}">立即登录</a>
    </p>

    <style>
        .form-input {
            width: 100%;
            padding: 10px 14px;
            border: 1px solid #ccc;
            border-radius: 6px;
            font-size: 14px;
            box-sizing: border-box;
        }

        .form-input:focus {
            outline: none;
            border-color: #007BFF;
            box-shadow: 0 0 5px rgba(0, 123, 255, 0.2);
        }

        .form-button {
            background-color: #007BFF;
            color: white;
            padding: 10px 30px;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            font-size: 16px;
        }

        .form-button:hover {
            background-color: #0056b3;
        }
    </style>
{% endblock %}